# class Manage:
# 	def __new__(cls, *args, **kwargs):
# 		instance = super().__new__(cls)
# 		print(f"instance id{id(instance)}")
# 		return instance
# 	def __init__(self):
# 		print("self 的 id", id(self))
# 	def __str__(self):
# 		return "Manage 类的实例"
#
# 	def __del__(self):
# 		print(f"释放self {id(self)}")
#
#
# m = Manage()
# print(m, f"m 的id{id(m)}")
# del m



# class Singleton:
# 	def __new__(cls, *args, **kwargs):
# 		if not hasattr(cls, "obj"):
# 			instance = super().__new__(cls)
# 			setattr(cls, "obj", instance)
#
# 		return getattr(cls, "obj")
#
#
# m1 = Singleton()
# print(id(m1), "m1")
# m2 = Singleton()
# print(id(m2), "m2")


# from 扩展 import k_调度apscheduler
#
# print(k_调度apscheduler.__doc__)
#


# class Person:
# 	pass
#
# p = Person()
# print(p.__sizeof__())

# class Person:
#
# 	def __getattr__(self, item):
# 		return True
#
# p = Person()
# print(hasattr(p, "obj"))


# class Person:
# 	def __init__(self, age):
# 		self.age = age
#
# 	def __gt__(self, other):
# 		return self.age > other.age
#
# 	def __lt__(self, other):
# 		return self.age < other.age
#
# p1 = Person(30)
# p2 = Person(20)
#
# print(p1 < p2)


# with open(f"j_垃圾回收.py", "r") as f:
# 	print(f.read())

# f = open(f"j_垃圾回收.py", "r")
# print(f.read())
# f.close()


# class MyOpen:
# 	def __enter__(self):
# 		print(f"进入")
# 		return self
#
# 	def wake_up(self):
# 		print(f"醒醒啦")
# 	def __exit__(self, exc_type, exc_val, exc_tb):
# 		print(f"退出")
#
#
# # m = MyOpen
#
# with MyOpen() as mo:
# 	mo.wake_up()


# class Person:
# 	name = "ppp"
#
# 	def __dir__(self):
# 		return ["name"]
#
# p = Person()
#
# print(dir(p))








######################################################

# class Person:
# 	"""+++Person++++"""
#
# p = Person()
# p.name = "qiku"
#
# def get_name(self):
# 	return self.name

# p.get_name = get_name
# print(p.get_name(p))

# import types
# p.get_name = types.MethodType(get_name, p)
# print(p.get_name())



#
# # 添加类属性
# Person.max_age = 100
# print(Person.max_age)
#
#
# # 获取类相关信息
#
# @classmethod
# def info(cls):
# 	return cls.__name__ + cls.__doc__
#
# Person.info = info
#
# print(print(Person.info()))
#
#
# @staticmethod
# def get_max_value(a, b):
# 	return a if a > b else b
#
#
# Person.max_value = get_max_value
#
# print(Person.max_value(100,200))
#
#
#




# "".split()
# [].append()
# ().count()
# {}.get()
# set().add()